package cn.itsource.fallback;

import cn.itsource.openfeign.LoginOpenfeign;
import cn.itsource.pojo.domain.Login;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * @program fccar-two
 * @Description
 * @Author TT
 * @Date 2024/09/05 17:06
 * @Version 1.0
 */
public class LoginOpenfeignFallbackFactory implements FallbackFactory<LoginOpenfeign> {
    @Override
    public LoginOpenfeign create(Throwable cause) {
        return new LoginOpenfeign() {
            @Override
            public JSONResult create(Login login) {
                return JSONResult.error();
            }
        };
    }
}
